-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove External Connection Secrets from operator responsibilities #118
Remove External Connection Secrets from operator responsibilities #118
Conversation
08d41b9
to
563e58d
Compare
563e58d
to
ecc93f8
Compare
Secrets used for testing: ds-pipeline-db-sample: apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: ds-pipeline-db-sample
data:
password: {{ base64-encoded Database password }} mlpipeline-minio-artifact: apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: mlpipeline-minio-artifact
data:
accesskey: {{ base64-encoded S3 Access Key }}
host: {{ base64-encoded S3 Endpoint URL }}
port: {{ base64-encoded S3 Endpoint Port }}
secretkey: {{ base64-encoded S3 Secret Key }}
secure: {{ base64-encoded boolean true/false (true if https, false if http) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atm this will not work for db because the deployment for apiserver (and kfp ui) will still get the secret it was previously deploying passed in as env vars, the culprit is here
Also, you may want to run through this code now that we are not deploying our own secret any more, as this may need to reflect that change.
ecc93f8
to
24a957a
Compare
746d4ef
to
db6ce91
Compare
Change to PR detected. A new PR build was completed. |
db6ce91
to
3eb5187
Compare
Change to PR detected. A new PR build was completed. |
cc7d0b8
to
bb6a384
Compare
Change to PR detected. A new PR build was completed. |
currently this doesn't work for s3 storage because we are not passing in |
Change to PR detected. A new PR build was completed. |
a7d01dd
to
f3070b6
Compare
Change to PR detected. A new PR build was completed. |
I have pretty thoroughly tested this and logged the outcomes: The default cases I don't really care that much, they seem like more edge cases. Verification check list: Standard Test suite (STS):
For the sample.yamlapiVersion: datasciencepipelinesapplications.opendatahub.io/v1alpha1
kind: DataSciencePipelinesApplication
metadata:
name: case3
namespace: dspa
spec:
apiServer:
image: quay.io/opendatahub/ds-pipelines-api-server@sha256:650f196f212664c5d4bd9a293fcd5fd0dca40e1d5c3af67f57b2e69a436070b2
database:
mariaDB:
passwordSecret:
key: case3dbpsw
name: case3-dbsecret
objectStorage:
minio:
image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance'
mlpipelineUI:
image: 'quay.io/opendatahub/odh-ml-pipelines-frontend-container:beta-ui'
---
kind: Secret
apiVersion: v1
metadata:
name: case3-dbsecret
stringData:
case3dbpsw:
type: Opaque Default Connections
External Connections
Upgrade testing: Steps (with default MariaDB):
Steps (with External DB):
|
We want this check:
@gmfrasca I did not confirm the above for the MariaDB case. I'm not sure if ODH Dashboard creates any secrets for the MariaDB default deployment, please confirm this and if dashboard indeed uses their own secret, then we need to handle this too:
|
f3070b6
to
06b0bc1
Compare
- Not useful as Minio/MariaDB params will now generate their secrets automatically if they are missing, so removing before the option hits production and needs to be accounted for in the API
- Allows DSP APIServer to use credentials found in secrets other than 'mlpipeline-minio-artifact'
06b0bc1
to
c8835b8
Compare
Change to PR detected. A new PR build was completed. |
6fdc5db
to
4e4c3fa
Compare
Change to PR detected. A new PR build was completed. |
restested all cases, and confirmed upgrades with odh v2 operator, the dspa seamlessly switches to using the secret created via odh dashboard, it does not clean up the /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HumairAK The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Resolves #151
DSPO should not be responsible for maintaining the connections secrets for an external database or object store. Remove this from the maintained artifacts list.
Description
DSPO should not be responsible for maintaining the connections secrets for an external database or object store. Remove this from the maintained artifacts list.
How Has This Been Tested?
For all tests, assume DSPA is named
sample
There are essentially 9 test cases/DSPAs here:
** Default Values Test **
ds-pipline-db-sample
andds-pipeline-s3-sample
secrets]** Object Storage Tests **
spec.objectStorage.minio.s3CredentialsSecret
specified but the secret specified insecretName
does not exist yet [expected: DSPO will create this secret and generate random credentials for the accesskey and secretkey]spec.objectStorage.minio.s3CredentialsSecret
specified and the secret specified insecretName
already exists [expected: DSPO will create Minio pod but reuse values found in this secret]spec.objectStorage.externalStorage.s3CredentialsSecret
specified but the secret specified insecretName
does not exist yet [expected: DSPO will not spin up any pods, and will return an error]spec.objectStorage.externalStorage.s3CredentialsSecret
specified and the secret specified insecretName
already exists [expected: DSPO will spin up a DSPA and successfully connect to the External S3 Storage]** Database Tests **
spec.database.mariaDB.passwordSecret
specified but the secret specified inname
does not exist yet [expected: DSPO will create this secret and generate random credentials for the password]spec.database.mariaDB.passwordSecret
specified and the secret specified inname
already exists [expected: DSPO will create MariaDB pod but reuse the password found in this secret]spec.database.externalDB.passwordSecret
specified but the secret specified inname
does not exist yet [expected: DSPO will not spin up any pods, and will return an error]spec.database.externalDB.passwordSecret
specified and the secret specified inname
already exists [expected: DSPO will spin up a DSPA and successfully connect to the External Database]Merge criteria: